import request from '@/utils/request'

// 查询自动代发规则列表
export function listAutopay(data) {
  return request({
    url: '/autopay-rule/rule/v1.0/list',
    method: 'post',
    data: data
  })
}

// 查询角色详细
export function getRule(strategyId) {
  return request({
    url: '/autopay-rule/rule/v1.0/detail?strategyId=' + strategyId,
    method: 'get'
  })
}

// 新增自动代发规则
export function addRule(data) {
  return request({
    url: '/autopay-rule/rule/v1.0/add',
    method: 'post',
    data: data
  })
}

// 修改自动代发规则
export function updateRule(data) {
  return request({
    url: '/autopay-rule/rule/v1.0/update',
    method: 'post',
    data: data
  })
}

// 删除
export function delRule(strategyId) {
  return request({
    url: '/autopay-rule/rule/v1.0/del?strategyId='+ strategyId,
    method: 'get'
  })
}